<template>
  <div class="contactPopup">
    <u-popup :closeOnClickOverlay="true" @close="close" :show="show" bgColor="transparent" mode="center" round="10px">
      <view class="content">
        <div class="title">{{ title }}</div>
        <div class="desc">{{ content }}</div>
        <div class="submit" @click="$emit('submit')">{{ btnTetx }}</div>
      </view>
      <image @click="$emit('close')" class="close" src="@/static/images/common/close.png" mode="scaleToFill" />
    </u-popup>
  </div>
</template>

<script>
export default {
  name: "contactPopup",
  props: {
    show: {
      type: Boolean,
      default: true,
    },
    title: {
      type: String,
      default: "与老板联系需要消耗1积分",
    },
    content: {
      type: String,
      default: "您当前剩余5积分可用，是否立即与老板联系？",
    },
    btnTetx: {
      type: String,
      default: "联系老板",
    },
  },
  data() {
    return {};
  },
  computed: {},
  methods: {
    close() {
      this.$emit("close");
    },
  },
  watch: {},

  // 组件周期函数--监听组件挂载完毕
  mounted() {},
  // 组件周期函数--监听组件数据更新之前
  beforeUpdate() {},
  // 组件周期函数--监听组件数据更新之后
  updated() {},
  // 组件周期函数--监听组件激活(显示)
  activated() {},
  // 组件周期函数--监听组件停用(隐藏)
  deactivated() {},
  // 组件周期函数--监听组件销毁之前
  beforeDestroy() {},
};
</script>

<style scoped lang="scss">
.contactPopup {
  .content {
    width: 288px;
    min-height: 179px;
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
    padding: 20px;
    .title {
      font-size: 18px;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #333333;
      text-align: center;
    }
    .desc {
      font-size: 14px;
      font-family: PingFang SC-Regular, PingFang SC;
      font-weight: 400;
      color: #666666;
      margin: 15px 18px;
      text-align: center;
    }
    .submit {
      width: 245px;
      height: 40px;
      background: linear-gradient(90deg, #ffa222 0%, #ff8822 100%);
      border-radius: 20px 20px 20px 20px;
      opacity: 1;
      font-size: 16px;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #ffffff;
      text-align: center;
      line-height: 40px;
    }
  }
  .close {
    width: 23px;
    height: 23px;
    margin: 10px auto;
  }
}
</style>
